import javax.swing.tree.TreeNode;
import java.util.Enumeration;

/*
class Solution7 {
    public int sumNumbers(TreeNode root) {
        return difs(root,0);
    }

    public int difs(TreeNode root,int prev) {
        int tmp = root.val + prev*10;
        if(root.left == null && root.right == null) {
            return tmp;
        }
        int left = 0;
        int right = 0;
        if(root.left != null)  left += difs(root.left,tmp);
        if(root.right != null)  right += difs(root.right,tmp);
        int sum = left + right;
        return sum;
    }
}*/
